import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wallet_utils/base_router_config.dart';
import 'package:wallet_utils/color.dart';
import 'package:wallet_utils/event_bus_utils.dart';
import 'package:wallet_utils/hopson_cash_ts.dart';
import 'package:wallet_utils/ht_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wallet_utils/msg_event_utils.dart';
import 'package:wallet_utils/report_widget/click_widget.dart';
import 'package:wallet_utils/safe_bottom_view.dart';
import 'package:wallet_utils/text_style.dart';
import 'logic.dart';

class HXHAuditPassPage extends StatelessWidget {
  final logic = Get.put(HXHAuditPassLogic());
  final state = Get.find<HXHAuditPassLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorManager.colorF4F5F6,
      appBar: htCommonAppbar(context, title: ''),
      bottomNavigationBar: setHXHBottomButton(
        context,
        '立即提现',
        hasShadow: false,
        color: ColorManager.colorFFFFFF,
        onPressed: () {
          logic.popover();
        },
      ),
        body: GetBuilder<HXHAuditPassLogic>(builder: (logic) {
          return Column(
            children: [
              Container(
                width: MediaQuery.of(context).size.width, // 屏幕宽度
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Container(
                      margin: EdgeInsets.only(top: 14.w, left: 156.sp),
                      child: Row(
                        children: [

                          Image.asset('images/hxh_logo.png',
                              width: 18.w, height: 18.h),
                          SizedBox(
                            width: 5.w,
                          ),
                          Text(
                              state.institutionProductName ?? '',
                              style: TextStyleUtils.style000000(
                                  fontSize: 12.sp, fontWeight: Medium)),
                        ],
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 14.w, left: 103.sp),
                      child: Row(
                        children: [
                          Image.asset('images/hxh_audit_pass.png',
                              width: 20.w, height: 20.h),
                          Text('恭喜您！已通过初审',
                              style: TextStyleUtils.style000000(
                                  fontSize: 16.sp, fontWeight: Medium)),
                        ],
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 5.w),
                      // color: ColorManager.colorFFFFFF,
                      child: Text(
                          "审核时间 ${state.auditTime} ",
                          style: TextStyleUtils.style666666(fontSize: 12.sp)),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 20.w, left: 15.w),
                      width: MediaQuery.of(context).size.width - 30,
                      height: 64.w,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(8),
                        color: ColorManager.colorFFFFFF,
                      ),
                      // color: ColorManager.colorFFFFFF,
                      child: Container(
                        margin: EdgeInsets.only(top: 20.w, left: 15.w),
                        child: Text(
                            "¥ 申请金额 ${state.auditAmount??'0'} ",
                            style: TextStyleUtils.style000000(
                                fontSize: 18.w, fontWeight: Medium)),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: 10.w, left: 15.w),
                      width: MediaQuery.of(context).size.width - 30,
                      height: 77.w,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(8),
                        color: ColorManager.colorFFFFFF,
                      ),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceAround,
                        children: [
                          Column(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Text(
                                // logic.productList![index].loanAmount ?? '',
                                '申请期数',
                                style: TextStyleUtils.style999999(
                                  fontSize: 13.w,
                                ),
                              ),
                              SizedBox(
                                height: 7.w,
                              ),
                              Text(
                                "${state.auditPeriodNum??'--'} 个月",
                                style: TextStyleUtils.style000000(fontSize: 14.w),
                              )
                            ],
                          ),
                          Column(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Text(
                                // logic.productList![index].loanAmount ?? '',
                                '利率(单利)',
                                style: TextStyleUtils.style999999(
                                  fontSize: 13.w,
                                ),
                              ),
                              SizedBox(
                                height: 7.w,
                              ),
                              Text(
                              "${state.orderYearRate??'--'} %",
                                style: TextStyleUtils.style000000(fontSize: 14.w),
                              )
                            ],
                          ),
                          // Column(
                          //   mainAxisAlignment: MainAxisAlignment.center,
                          //   children: [
                          //     Text(
                          //       // logic.productList![index].loanAmount ?? '',
                          //       '总服务费',
                          //       style: TextStyleUtils.style999999(
                          //         fontSize: 13.w,
                          //       ),
                          //     ),
                          //     SizedBox(
                          //       height: 7.w,
                          //     ),
                          //     Text(
                          //       '6个月',
                          //       style: TextStyleUtils.style000000(fontSize: 14.w),
                          //     )
                          //   ],
                          // ),
                        ],
                      ),
                    ),
                  ],
                ),
              ),
            ],
          );
        }),
    );
  }
}
